
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%
    request.setCharacterEncoding("UTF-8");
    String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- <%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListPage.jsp" %> --%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
</head>
<style>
    select {
        width: 234px;
        height: 31px
    }

    .gn_name {
        padding-top: 5px
    }

    .div_zilei {
        width: 100%;
        height: 30px
    }

    .tr {
        height: 40px;
        background:#57a0ff;
		font-weight:700;
    }

    .tr td {
        font-size: 14px;
        color: #ffffff
    }

    .tr_td {
        height: 40px;
    }

    .tr_td td {
        border-bottom: 1px solid #ededed;
        text-align: center;
    }

    tr td:nth-child(1) {
        font-size: 14px;
        color: #cccccc
    }

    .date {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .tr_td td:nth-child(1) {
        border-left: 1px solid #cccccc;
    }

    .tr_td td:nth-child(3) {
        border-right: 1px solid #cccccc;
    }

    .addTable.deleteTable:HOVER {
        cursor: pointer;
    }
    .fseq{border: none;
    	  width: 20px;
    	  color: #cccccc; 
   	}

    type[type='checkbox'] {
        width: 15px
    }
    	.modal-data1 {
			  visibility: hidden; 
			  z-index: 1001;
			  width: 1000px;
			  min-height: 500px;
			  margin: 100px auto;
			  background-color: #FFFFFF;
			 /* border: 1px solid #C80B14;*/
			 -moz-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
        	 -webkit-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
      /*         box-shadow:0 0 10px #cccccc; 
			  box-shadow: #cccccc; */
			  box-shadow: 0 10px 20px #57a1ff inset,0 -10px 0 #57a0ff inset;
			  padding: 5px;
			  text-align: center;
			  position: fixed;
			  left: 22%;
		}
		
		.modal-data1 td{padding-left: 15px;padding-right: 15px}
		.modal-data1 tr:FIRST-CHILD td{padding: 0px 10px;}
		.modal-data1 tr{padding-top: 30px}
		.modal-data1 form table {
			margin: 0px
		}
</style>
<body style="background: #f5f5f5">
<div class="main">
    <div id="modal-overlay">

    </div>
    
    	<div class="modal-data1" >
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name1" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn1">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:1000px; height:350px; overflow:scroll;">
			      <form action="">
			        <table class="head1"  style="width: auto;white-space:nowrap;border-spacing:0px">
			        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
			        <td style="width: 20px"></td> 
			        <td>
			        	编码
			        </td>
			        <td>
			        	名称
			        </td>
			        <td>
			        	准考证明编号
			        </td>
			        <td>
			        	身份证号码
			        </td>			       
			        <td>
			        	手机
			        </td>
			        <td>
			        	申领类型
			        </td>
			        <td>
			        	入学日期
			        </td>
			        <td>
			        	性别
			        </td>
			        <td>
			        	欠费
			        </td>
			        <td>
			        	业务日期
			        </td>
			        <td>
			        	单据状态
			        </td>
			        <td>
			        	ID
			        </td>
			        <td>
			        	车型
			        </td>			       			       
			        </tr>			        
			        </table>
			      </form>
                    <button class="subtn1"
                            style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;left: 280px">
			      	确定
			      </button>
                    <button class="btn"
                            style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;right: 280px">
			      	关闭
			      </button>
			     </div>			    
			</div>
    
    <div class="weizhi">
		<c:if test="${subjectOneResult.cfbillstate eq 3 }">
			考试管理>>科目一考试结果登记>>修改
		</c:if>
		<c:if test="${subjectOneResult.cfbillstate eq 4 || subjectOneResult.cfbillstate eq 5 }">
			考试管理>>科目一考试结果登记>>查看
		</c:if>
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;height:900px">
 	<c:if test="${subjectOneResult.cfbillstate eq 3 }">
        <div class="div_form">
            <form id="update_subjectOneResult" action="<%=path%>/DrivingSys/updateSubjectOneResult" method="post" class="form" onsubmit="return subForm()">
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
                        <input type="hidden" name="fid" value="${subjectOneResult.fid}" readonly="readonly" style="color: gray;"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                        <input type="text" class="fnumber" name="fnumber" value="${subjectOneResult.fnumber}" style="color: gray;" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">考试日期&nbsp;:&nbsp;</span>
                        <input type="text" class="ksrq" name="fbizdate" id="ywrq" value="${subjectOneResult.fbizdate }"
                               onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" onchange="changeFbizdate($(this))"/>
                        <img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                        <input name="fdescription" value="${subjectOneResult.fdescription }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                        <select name="cfbillstate" >
                            <option id="shenhe" style="color: gray;" value="3">保存</option>
                        </select>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select class="cfcartype" name="cfcartype" onchange="changeCartype()">
                        	<option value="${subjectOneResult.cfcartype }" >${subjectOneResult.cfcartype }</option>                      	
                        	<option value="A1">A1</option>
                        	<option value="A2">A2</option>
                        	<option value="A3">A3</option>
                        	<option value="B1">B1</option>
                        	<option value="B2">B2</option>
                        	<option value="C1" >C1</option>
                        	<option value="C2">C2</option>
                        	<option value="C3">C3</option>
                        	<option value="C4">C4</option>
                        	<option value="D">D</option>
                        	<option value="E">E</option>
                        	<option value="F">F</option>
                        	<option value="M">M</option>
                        	<option value="N">N</option>                       	
                        	<option value="P">P</option>
                        </select>
                        
                    </div>
                </div>
                <!-- <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                        <input id="cfzbs" name="cfzbs" value="" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                        <input id="cfdqbkrs" name="cfdqbkrs" value="0" readonly="readonly"/>
                    </div>               
                </div>
                <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span></div> -->
                <div class="div_zilei">
                    <div style="width: 93%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color:#57a0ff;font-weight:700;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color: #57a0ff;font-weight:700;font-size: 14px" class="deleteTable">删除</span>
                    </div>
                </div>
                <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:350px;margin-left: 90px">
                    <table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                        <tr  class="tr">
                        	<td><%--<input type="checkbox" style="width: 15px;" name="check" class="check1">--%></td>
                            <td  align="center">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">学员</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">申请车型</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">应收金额</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">优惠</td>                   
                            <td style="width: 90px;" align="center">vip</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试结果</td>
                            <td style="width: 90px;" align="center">备注</td>                       
                        </tr>
                        <c:forEach items="${subjectOneResult.subjectOneResultentryList }" var="subjectOneResultentry">
								<tr >
									<td align="center" class='td'><input style="width: 15px;" type="checkbox" name="checkchilden"></td>
									<td align="center"  ><input type="text" name="stufseq" class="fseq" value="${ subjectOneResultentry.fseq}" readonly="readonly"></td>
									<td align='center'><input class='jlznamebm'
										style='width: 90px;' type='text' name='stucfzkzmbh' value='${subjectOneResultentry.cfzkzmh}' readonly="readonly"/>
									</td>
									<td align='center'><input style='width: 170px;' type='text'
										name='stufnumber' value='${subjectOneResultentry.cfstudentno}' readonly="readonly" /></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stuname' value='${subjectOneResultentry.studentName }' class="is_click_ne" onclick="clickName($(this))"  readonly="readonly"/> <input
										style='width: 90px;' type='hidden' name='stuid' class='subfid' value='${subjectOneResultentry.cfstudentid }' readonly="readonly"/>
									</td>
									<td align='center'><input style='width: 140px;' type='text'
										name='stucfidcardno' value='${subjectOneResultentry.cfidcardno }' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfsex eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
										name='stucfsex' value='男' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfsex eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
										name='stucfsex' value='女' readonly="readonly"/></td>
									</c:if>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfsjhm' value='${subjectOneResultentry.cfmobile }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucflxdh' value='${subjectOneResultentry.cfphone }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfslzjcxdh' value='${subjectOneResultentry.cfsqzjcx }' readonly="readonly"/></td>
									<td align='center'><input style='width: 150px;' type='text'
										name='stucfclazzName' value='${ subjectOneResultentry.cfclazz}' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfamount' value='${subjectOneResultentry.cfreceivable }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfreceived' value='${subjectOneResultentry.cfreceived }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfarrearage' value='${subjectOneResultentry.cfarrearage }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucffavorable' value='${subjectOneResultentry.cffavorable}' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfvip eq 0 }">
										<td align='center'><input style='width: 45px;'
										type='checkbox' checked="checked" name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq 1 }">
										<td align='center'><input style='width: 45px;'
										type='checkbox'  name='' value='0' onclick='clickvip($(this))' />
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq null }">
										<td align='center'><input style='width: 45px;'
										type='checkbox'  name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='本地' readonly="readonly" /></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='异地' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 3 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='学生' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq null }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfexamresult eq 1 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;'>											
												<option value='1' selected="selected">合格</option>
												<option value='2'>不合格</option>
												<option value='3'>缺考</option></select></td>
									</c:if>	
									<c:if test="${subjectOneResultentry.cfexamresult eq 2 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;'>											
												<option value='1' >合格</option>
												<option value='2' selected="selected">不合格</option>
												<option value='3'>缺考</option></select></td>
									</c:if>	
									<c:if test="${subjectOneResultentry.cfexamresult eq 3 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;'>											
												<option value='1' >合格</option>
												<option value='2'>不合格</option>
												<option value='3' selected="selected">缺考</option></select></td>
									</c:if>											
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfremark' value='${subjectOneResultentry.cfremark }' /></td>
								</tr>

							</c:forEach>
                    </table>
                </div>

               
				<div class="div_input_hang">
                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                        <input  disabled="disabled" name="checkName"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                        <input  disabled="disabled" name="createName" value="${user.name }"/>
                        
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectOneResult.fcreatetime}"/>
                    </div>
                </div>

                <div class="div_tj" style="padding-top: 20px">
					<shiro:hasPermission name="/sureSubjectOneResult">
						<div>
                            <input class="input_submit bc" value="" type="submit">
						</div>
					</shiro:hasPermission>

					<shiro:hasPermission name="/submitSubjectOneResult">
						<div>
							<input  class="input_submit tj" value="" type="button" onclick="audit(4)">
						</div>
					</shiro:hasPermission>
					<div>
						<input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
					</div>

                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
            </form>
        </div>
        </c:if>

		<c:if test="${subjectOneResult.cfbillstate eq 4 }">
			<div class="div_form">
				<form id="update_subjectOneResult" action="<%=path%>/DrivingSys/updateSubjectOneResult" method="post" class="form">
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
							<input type="hidden" name="fid" value="${subjectOneResult.fid}" readonly="readonly" style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
							<input class="fnumber" type="text" name="fnumber" value="${subjectOneResult.fnumber}" style="color: gray;" readonly="readonly"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">考试日期&nbsp;:&nbsp;</span>
							<input type="text" class="ksrq" name="fbizdate" id="ywrq" value="${subjectOneResult.fbizdate }" readonly="readonly"/>
							<img src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">参考信息&nbsp;:&nbsp;</span>
							<input name="fdescription" value="${subjectOneResult.fdescription }"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
							<select name="cfbillstate" >
								<option id="shenhe" style="color: gray;" value="4">提交</option>
							</select>
						</div>
						<div class="input_hang">
							<span class="gn_name">车型&nbsp;:&nbsp;</span>
							<select class="cfcartype" name="cfcartype" disabled="disabled">
								<option value="${subjectOneResult.cfcartype }">${subjectOneResult.cfcartype }</option>
								<option value="A1">A1</option>
								<option value="A2">A2</option>
								<option value="A3">A3</option>
								<option value="B1">B1</option>
								<option value="B2">B2</option>
								<option value="C1" >C1</option>
								<option value="C2">C2</option>
								<option value="C3">C3</option>
								<option value="C4">C4</option>
								<option value="D">D</option>
								<option value="E">E</option>
								<option value="F">F</option>
								<option value="M">M</option>
								<option value="N">N</option>
								<option value="P">P</option>
							</select>

						</div>
					</div>
					<!-- <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                            <input id="cfzbs" name="cfzbs" value="" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                            <input id="cfdqbkrs" name="cfdqbkrs" value="0" readonly="readonly"/>
                        </div>
                    </div>
                    <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span></div> -->
					<div class="div_zilei">
						<%--<div style="width: 88%;text-align: right;">
							<img src="<%=path%>/image/insert2323.jpg" class="addTable">
							<span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
							<img src="<%=path%>/image/delete212.png" class="deleteTable">
							<span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
						</div>--%>
					</div>
					<div style="overflow:auto;/* min-height: 200px; */width: 88%; height:350px;margin-left: 90px">
						<table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
							<tr  class="tr">
								<td><%--<input type="checkbox" style="width: 15px;" name="check" class="check1">--%></td>
								<td  align="center">序号</td>
								<td style="width: 90px;" align="center">准考证明编号</td>
								<td style="width: 90px;" align="center">学员编码</td>
								<td style="width: 90px;" align="center">学员</td>
								<td style="width: 90px;" align="center">身份证号</td>
								<td style="width: 90px;" align="center">性别</td>
								<td style="width: 90px;" align="center">手机</td>
								<td style="width: 90px;" align="center">电话</td>
								<td style="width: 90px;" align="center">申请车型</td>
								<td style="width: 90px;" align="center">班级</td>
								<td style="width: 90px;" align="center">应收金额</td>
								<td style="width: 90px;" align="center">已收</td>
								<td style="width: 90px;" align="center">欠费</td>
								<td style="width: 90px;" align="center">优惠</td>
								<td style="width: 90px;" align="center">vip</td>
								<td style="width: 90px;" align="center">本地/异地</td>
								<td style="width: 90px;" align="center">考试结果</td>
								<td style="width: 90px;" align="center">备注</td>
							</tr>
							<c:forEach items="${subjectOneResult.subjectOneResultentryList }" var="subjectOneResultentry">
								<tr >
									<td align="center" class='td'><input style="width: 15px;" type="checkbox" name="checkchilden"></td>
									<td align="center"  ><input type="text" name="stufseq" class="fseq" value="${ subjectOneResultentry.fseq}" readonly="readonly"/></td>
									<td align='center'><input class='jlznamebm'
															  style='width: 90px;' type='text' name='stucfzkzmbh' value='${subjectOneResultentry.cfzkzmh}' readonly="readonly"/>
									</td>
									<td align='center'><input style='width: 170px;' type='text'
															  name='stufnumber' value='${subjectOneResultentry.cfstudentno}' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stuname' value='${subjectOneResultentry.studentName }' readonly="readonly" /> <input
											style='width: 90px;' type='hidden' name='stuid' class='subfid' value='${subjectOneResultentry.cfstudentid }' readonly="readonly"/>
									</td>
									<td align='center'><input style='width: 140px;' type='text'
															  name='stucfidcardno' value='${subjectOneResultentry.cfidcardno }' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfsex eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucfsex' value='男' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfsex eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucfsex' value='女' readonly="readonly"/></td>
									</c:if>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfsjhm' value='${subjectOneResultentry.cfmobile }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucflxdh' value='${subjectOneResultentry.cfphone }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfslzjcxdh' value='${subjectOneResultentry.cfsqzjcx }' readonly="readonly"/></td>
									<td align='center'><input style='width: 150px;' type='text'
															  name='stucfclazzName' value='${ subjectOneResultentry.cfclazz}' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfamount' value='${subjectOneResultentry.cfreceivable }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfreceived' value='${subjectOneResultentry.cfreceived }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfarrearage' value='${subjectOneResultentry.cfarrearage }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucffavorable' value='${subjectOneResultentry.cffavorable}' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfvip eq 0 }">
										<td align='center'><input style='width: 45px;'
																  type='checkbox' checked="checked" name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
											<input style='width: 90px;' type='hidden' name='stucfvip'
												   value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq 1 }">
										<td align='center'><input style='width: 45px;'
																  type='checkbox'  name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
											<input style='width: 90px;' type='hidden' name='stucfvip'
												   value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq null }">
										<td align='center'><input style='width: 45px;'
																  type='checkbox'  name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
											<input style='width: 90px;' type='hidden' name='stucfvip'
												   value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='本地' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='异地' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 3 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='学生' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq null }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfexamresult eq 1 }">
										<td align='center'><select name='stucfexamresult'
																   style='width: 90px;' disabled="disabled">
											<option value='1' selected="selected">合格</option>
											<option value='2'>不合格</option>
											<option value='3'>缺考</option></select></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfexamresult eq 2 }">
										<td align='center'><select name='stucfexamresult'
																   style='width: 90px;' disabled="disabled">
											<option value='1' >合格</option>
											<option value='2' selected="selected">不合格</option>
											<option value='3'>缺考</option></select></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfexamresult eq 3 }">
										<td align='center'><select name='stucfexamresult'
																   style='width: 90px;' disabled="disabled">
											<option value='1' >合格</option>
											<option value='2'>不合格</option>
											<option value='3' selected="selected">缺考</option></select></td>
									</c:if>
									<td align='center'><input style='width: 90px;' type='text'
															  name='stucfremark' value='${subjectOneResultentry.cfremark }' readonly="readonly"/></td>
								</tr>

							</c:forEach>
						</table>
					</div>


					<div class="div_input_hang">

					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">审核人&nbsp;:&nbsp;</span>
							<input  disabled="disabled" name="checkName"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">创建者&nbsp;:&nbsp;</span>
							<input  disabled="disabled" name="createName" value="${user.name }"/>

						</div>
						<div class="input_hang">
							<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
							<input disabled="disabled" name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectOneResult.fcreatetime}"/>
						</div>
					</div>

					<div class="div_tj" style="padding-top: 20px">
						<shiro:hasPermission name="/auditSubjectOneResult">
							<div>
								<input  class="input_submit sh" value="" type="button" onclick="audit(5)">
							</div>
						</shiro:hasPermission>
						<shiro:hasPermission name="/againstAuditSubjectOneResult">
							<div>
								<input  class="input_submit fsh" value="" type="button" onclick="audit(3)">
							</div>
						</shiro:hasPermission>
						<div>
							<input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
						</div>
						<div>
							<input type="button" class="input_back fh" value="" onclick="back()"/>
						</div>
					</div>
				</form>
			</div>
		</c:if>

        <c:if test="${subjectOneResult.cfbillstate eq 5 }">
         <div class="div_form">
            <form  id="update_subjectOneResult" action="<%=path%>/DrivingSys/updateSubjectOneResult" method="post" class="form">
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input disabled="disabled" type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
						<input type="hidden" name="fid" value="${subjectOneResult.fid}" readonly="readonly" style="color: gray;"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                        <input disabled="disabled" class="fnumber" type="text" name="fnumber" value="${subjectOneResult.fnumber}" style="color: gray;" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">考试日期&nbsp;:&nbsp;</span>
                        <input disabled="disabled" type="text" class="ksrq" name="fbizdate" id="ywrq" value="${subjectOneResult.fbizdate}" readonly="readonly"/>
                        <img src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fdescription" value="${subjectOneResult.fdescription }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                        <select  name="cfbillstate" >
                            <option id="shenhe" style="color: gray;" value="5">审核</option>
                        </select>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select disabled="disabled" class="cfcartype" name="cfcartype">
                        	<option value="${subjectOneResult.cfcartype }" >${subjectOneResult.cfcartype }</option>                      	
                        	<option value="A1">A1</option>
                        	<option value="A2">A2</option>
                        	<option value="A3">A3</option>
                        	<option value="B1">B1</option>
                        	<option value="B2">B2</option>
                        	<option value="C1" >C1</option>
                        	<option value="C2">C2</option>
                        	<option value="C3">C3</option>
                        	<option value="C4">C4</option>
                        	<option value="D">D</option>
                        	<option value="E">E</option>
                        	<option value="F">F</option>
                        	<option value="M">M</option>
                        	<option value="N">N</option>                       	
                        	<option value="P">P</option>
                        </select>
                        
                    </div>
                </div>
                <!-- <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                        <input id="cfzbs" name="cfzbs" value="" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                        <input id="cfdqbkrs" name="cfdqbkrs" value="0" readonly="readonly"/>
                    </div>               
                </div>
                <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span></div> -->
                <div class="div_zilei">
                    <%--<div style="width: 88%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                    </div>--%>
                </div>
                <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:350px;margin-left: 90px">
                    <table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                        <tr  class="tr">
                        	<td><%--<input type="checkbox" style="width: 15px;" name="check" class="check1">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">学员</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">申请车型</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">应收金额</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">优惠</td>                   
                            <td style="width: 90px;" align="center">vip</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试结果</td>
                            <td style="width: 90px;" align="center">备注</td>                       
                        </tr>
                        <c:forEach items="${subjectOneResult.subjectOneResultentryList }" var="subjectOneResultentry">
								<tr >
									<td class='td'><input style="width: 15px;" type="checkbox" name="checkchilden"></td>
									<td align="center"><input type="text" name="fseq" class="fseq" value="${ subjectOneResultentry.fseq}" readonly="readonly"></td>
									<td align='center'><input class='jlznamebm'
										style='width: 90px;' type='text' name='stucfzkzmbh' value='${subjectOneResultentry.cfzkzmh}' />
									</td>
									<td align='center'><input style='width: 170px;' type='text'
										name='stufnumber' value='${subjectOneResultentry.cfstudentno}' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stuname' value='${subjectOneResultentry.studentName }' readonly="readonly" /> <input
										style='width: 90px;' type='hidden' name='stuid' class='subfid' value='${subjectOneResultentry.cfstudentid }' readonly="readonly"/>
									</td>
									<td align='center'><input style='width: 140px;' type='text'
										name='stucfidcardno' value='${subjectOneResultentry.cfidcardno }' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfsex eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
										name='stucfsex' value='男' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfsex eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
										name='stucfsex' value='女' readonly="readonly"/></td>
									</c:if>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfsjhm' value='${subjectOneResultentry.cfmobile }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucflxdh' value='${subjectOneResultentry.cfphone }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfslzjcxdh' value='${subjectOneResultentry.cfsqzjcx }' readonly="readonly"/></td>
									<td align='center'><input style='width: 150px;' type='text'
										name='stucfclazzName' value='${ subjectOneResultentry.cfclazz}' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfamount' value='${subjectOneResultentry.cfreceivable }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfreceived' value='${subjectOneResultentry.cfreceived }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfarrearage' value='${subjectOneResultentry.cfarrearage }' readonly="readonly"/></td>
									<td align='center'><input style='width: 90px;' type='text'
										name='stucffavorable' value='${subjectOneResultentry.cffavorable}' readonly="readonly"/></td>
									<c:if test="${subjectOneResultentry.cfvip eq 0 }">
										<td align='center' class='td'><input style='width: 45px;'
										type='checkbox' checked="checked" name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }'  readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq 1 }">
										<td align='center' class='td'><input style='width: 45px;'
										type='checkbox'  name='' value='0' onclick='clickvip($(this))' readonly="readonly"/>
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfvip eq null }">
										<td align='center' class='td'><input style='width: 45px;'
										type='checkbox'  name='' value='0' onclick='clickvip($(this))' />
										<input style='width: 90px;' type='hidden' name='stucfvip'
										value='${subjectOneResultentry.cfvip }' /></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 1 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='本地' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 2 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='异地' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq 3 }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='学生' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfbdyd eq null }">
										<td align='center'><input style='width: 90px;' type='text'
																  name='stucflocal' value='' readonly="readonly"/></td>
									</c:if>
									<c:if test="${subjectOneResultentry.cfexamresult eq 1 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;' disabled="disabled">
												<option value='1' selected="selected">合格</option>
												<option value='2'>不合格</option>
												<option value='3'>缺考</option></select></td>
									</c:if>	
									<c:if test="${subjectOneResultentry.cfexamresult eq 2 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;' disabled="disabled">
												<option value='1' >合格</option>
												<option value='2' selected="selected">不合格</option>
												<option value='3'>缺考</option></select></td>
									</c:if>	
									<c:if test="${subjectOneResultentry.cfexamresult eq 3 }">
									<td align='center'><select name='stucfexamresult'
										style='width: 90px;' disabled="disabled">
												<option value='1' >合格</option>
												<option value='2'>不合格</option>
												<option value='3' selected="selected">缺考</option></select></td>
									</c:if>											
									<td align='center'><input style='width: 90px;' type='text'
										name='stucfremark' value='${subjectOneResultentry.cfremark }' readonly="readonly"/></td>
								</tr>

							</c:forEach>
                    </table>
                </div>

               
				<div class="div_input_hang">
                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                        <input  disabled="disabled" name="checkName" value="${subjectOneResult.checkName }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                        <input  disabled="disabled" name="createName" value="${subjectOneResult.createName }"/>
                        
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectOneResult.fcreatetime}"/>
                    </div>
                </div>

                <div class="div_tj" style="padding-top: 20px">
					<shiro:hasPermission name="/againstAuditSubjectOneResult">
						<div>
							<input  class="input_submit fsh" value="" type="button" onclick="audit(3)">
						</div>
					</shiro:hasPermission>
					<div>
						<input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
					</div>
                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
            </form>
        </div>
        </c:if>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
<!-- <script id="table-template1-sub" type="text/x-handlebars-template">    
</script>-->
<script type="text/javascript">
    
  	//处理删除时候的this缓存
    var _this;  
    //删除一行
    $(".deleteTable").click(function () {
    	var k =0;
    	$("input:checkbox[name=checkchilden]:checked").each(function(i){
    		k++;
    	})
    	if(k == 0){
    		alert("请勾选需要删除的行!")
    		return false;
    	}
    	//删除
    	$("input:checkbox[name=checkchilden]:checked").each(function(i){
    		$(this).parent().parent().remove();
    	})
    	//处理序号
		$(".fseq").each(function(i){
			$(this).val(i+1)
		})
		$(".check1").removeAttr('checked')
    })
    //返回
    function back() {
        parent.closeSelectCard()

        //location = '<%=path%>/DrivingSys/querySubjectOneResult/look.action';
    }
    
    //增加学员数据
    function addStudentMesg(json){
        var student=json.studentsNameList;
        var students = "";
        var count =0;//计数
        for (var i = 0; i < student.length; i++) {
            //alert("需要添加的学员id" + student[i].fid)
            $(".subfid").each(function (j) {
                //alert("已经有的id：" + $(this).val())
                if ($(this).val() == student[i].fid) {
                    var name = $(this).parent().parent().find("td input[name=stuname]").val();
                    if (count == 0) {
                        students = name;
                    } else {
                        students += "," + name;
                    }
                    count++;
                }
            })
        }
        if(students != ''){
            alert(students+" 已经在列表中,请重新选择学员!")
            return false;
        }
    	var htmlperson = "<tr><td class='td'><input style='width: 15px;' type='checkbox' name='checkchilden' readonly=\"readonly\"></td>" +
        "<td align='center' width='20px' ><input type='text' class='fseq' name='stufseq'value='' readonly=\"readonly\"></td> " +
        "<td align='center'><input class='jlznamebm' style='width: 90px;' type='text' name='stucfzkzmbh' value='' readonly=\"readonly\"/>" +
        "</td><td align='center'><input style='width: 170px;' type='text' name='stufnumber' value='' readonly=\"readonly\" /></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stuname' value=''  class='is_click_ne' onclick='clickName($(this))' readonly=\"readonly\"/> <input style='width: 90px;' type='hidden' class='subfid' name='stuid' value=''/>" +
        "</td><td align='center'><input style='width: 140px;' type='text' name='stucfidcardno' value='' readonly=\"readonly\"/></td> " +
        "<td align='center'><input style='width: 90px;' type='text' name='stucfsex' value=''  readonly=\"readonly\"/>" +
        "</td><td align='center'><input style='width: 90px;' type='text' name='stucfsjhm' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucflxdh' value=''  readonly=\"readonly\"/>" +
        "</td><td align='center'><input style='width: 90px;' type='text' name='stucfslzjcxdh' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 150px;' type='text' name='stucfclazzName' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucfamount' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucfreceived' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucfarrearage' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucffavorable' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><input style='width: 45px;' type='checkbox' name='' value='0' onclick='clickvip($(this))' readonly=\"readonly\"/> <input style='width: 90px;' type='hidden' name='stucfvip' value='1'/></td> " +
        "<td align='center'><input style='width: 90px;' type='text' name='stucflocal' value='' readonly=\"readonly\"/></td>" +
        "<td align='center'><select name='stucfexamresult' style='width: 90px;'><option value='1'>合格</option><option value='2'>不合格</option><option value='3'>缺考</option></select></td>" +
        "<td align='center'><input style='width: 90px;' type='text' name='stucfremark' value=''/></td>" +
       " </tr>";          
	   //var student=json.studentsNameList;
    	for (var i = 0; i < student.length; i++) {
    		if(_this == null){
    			$("#table1").append(htmlperson)                     	
                $("#table1 tr:last").find("td").eq(2).children("input").val(student[i].cfzkzmbh)
            	$("#table1 tr:last").find("td").eq(3).children("input").val(student[i].fnumber)
            	$("#table1 tr:last").find("td").eq(4).children("input").val(student[i].fnameL2)
            	$("#table1 tr:last").find("td").eq(4).children("input").next().val(student[i].fid)
            	//alert(_this.find("td").eq(3).children("input").next().val())
            	$("#table1 tr:last").find("td").eq(5).children("input").val(student[i].cfidcardno)
            	if(student[i].cfsex == 1){
            		student[i].cfsex='男'
            	}else{
            		student[i].cfsex='女'
            	}
                $("#table1 tr:last").find("td").eq(6).children("input").val(student[i].cfsex)
            	$("#table1 tr:last").find("td").eq(7).children("input").val(student[i].cfsjhm)
            	$("#table1 tr:last").find("td").eq(8).children("input").val(student[i].cflxdh)
            	$("#table1 tr:last").find("td").eq(9).children("input").val(student[i].cfslzjcxdh)
            	$("#table1 tr:last").find("td").eq(10).children("input").val(student[i].cfclazzName)
            	$("#table1 tr:last").find("td").eq(11).children("input").val(student[i].cfamount)
            	$("#table1 tr:last").find("td").eq(12).children("input").val(student[i].cfreceived)
            	$("#table1 tr:last").find("td").eq(13).children("input").val(student[i].cfarrearage) 
            	$("#table1 tr:last").find("td").eq(14).children("input").val(student[i].cffavorable)           	
            	if(student[i].cflocal == 1){
            		student[i].cflocal='本地'
            	}else if(student[i].cflocal ==2){
            		student[i].cflocal='异地'
            	}else{
            		student[i].cflocal='学生'
            	}
                $("#table1 tr:last").find("td").eq(16).children("input").val(student[i].cflocal)
                
    		}else{
    			_this.find("td").eq(2).children("input").val(student[0].cfzkzmbh)
             	_this.find("td").eq(3).children("input").val(student[0].fnumber)
             	_this.find("td").eq(4).children("input").val(student[0].fnameL2)
             	_this.find("td").eq(4).children("input").next().val(student[0].fid)
             	//alert(_this.find("td").eq(3).children("input").next().val())
             	_this.find("td").eq(5).children("input").val(student[0].cfidcardno)
             	if(student[0].cfsex == 1){
             		student[0].cfsex='男'
             	}else{
             		student[0].cfsex='女'
             	}
             	_this.find("td").eq(6).children("input").val(student[0].cfsex)
             	_this.find("td").eq(7).children("input").val(student[0].cfsjhm)
             	_this.find("td").eq(8).children("input").val(student[0].cflxdh)
             	_this.find("td").eq(9).children("input").val(student[0].cfslzjcxdh)
             	_this.find("td").eq(10).children("input").val(student[0].cfclazzName)
             	_this.find("td").eq(11).children("input").val(student[0].cfamount)
             	_this.find("td").eq(12).children("input").val(student[0].cfreceived)
             	_this.find("td").eq(13).children("input").val(student[0].cfarrearage) 
             	_this.find("td").eq(14).children("input").val(student[0].cffavorable)           	
             	if(student[0].cflocal == 1){
             		student[0].cflocal='本地'
             	}else if(student[0].cflocal ==2){
             		student[0].cflocal='异地'
             	}else{
             		student[0].cflocal='学生'
             	}
             	_this.find("td").eq(16).children("input").val(student[0].cflocal)
             	//清除_this
             	_this=null;
             	break;//直接停止循环
    		}
    		//处理序号
    		$(".fseq").each(function(i){
    			$(this).val(i+1)
    		})             
		}
    	
       return true;
    }
    $('.addTable').click(function () {
    	var fbizdate=$("#ywrq").val();
    	if(fbizdate == null || fbizdate == ''){
    		alert("请选择业务日期！")
    		$("#ywrq").focus()
    	}else{
    		 clickName(null)  		 
        	 $('#modal-overlay').css('visibility', 'visible')
             $('.modal-data1').css('visibility', 'visible')
             $('input:checkbox[name=student]').removeAttr('checked');
             $('.page').show();
    	}
        
    }) 
    


    /* 关闭弹出框    */
    $('.btn').click(function () {
    	_this=null;
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.modal-data').css('visibility', 'hidden')
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('.head1 input:checkbox[name=student]').removeAttr('checked');
        $('.page').hide();
    })



    //弹出模式框
    function clickName(e) {
    	$(".head1 tr:not(':first')").remove()
    	//获取考试日期
    	var fbizdate=$.trim($(".ksrq").val())
    	//alert(fbizdate)
    	//获取车型
    	var cfcartype=$(".cfcartype").val()
    	//alert(cfcartype)
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data1').css('visibility', 'visible')
        $('.head1 input:checkbox[name=student]').removeAttr('checked');
        $('.page').show();
        if(e != null){
    		_this = e.parent().parent();
    	}         
        //根据考试日期和车型去后台取数据      
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsBySubscribedOne',
            type: "post",
            data: {'fbizdate': fbizdate,'cfcartype':cfcartype},
            dataType: "json",
            success: function (json) {  
            	//alert(json)
            	if(json.length == 0){
            		//alert("目前还没有相关数据,请重新选择考试日期和车型！")           		
            		var nostr='<tr><td style="width: 30px;"></td><td colspan="5">目前还没有相关数据,请重新选择考试日期和车型！</td></tr>'
            			$(".head1").append(nostr)
            	}else{
            	    var str ='';
            		for (var i = 0; i < json.length; i++) {
            			if(json[i].cfsex == 1){
            				json[i].cfsex='男';
            			}else{
            				json[i].cfsex='女';
            			}
                        if(json[i].cfzkzmbh == null){
                            json[i].cfzkzmbh = '';
                        }
            			str+='<tr class="xysj"><td style="width: 20px;" class="td"><input style="width: 20px;" type="checkbox" name="student" value="'+json[i].cfstudentid+'" onclick="checkBox($(this))"></td>';
            			str+='<td>'+json[i].cfstudentname+'</td><td>'+json[i].studentName+'</td><td>'+json[i].cfzkzmbh+'</td><td>'+json[i].cfidcardno+'</td>'
            			str+='<td>'+json[i].cfmobile+'</td><td>初次申领</td><td>'+json[i].cfrxsj+'</td>'
            			str+='<td>'+json[i].cfsex+'</td><td>'+json[i].cfqfje+'</td><td>'+fbizdate+'</td>'
            			str+='<td>审核</td><td>'+json[i].fid+'</td><td>'+cfcartype+'</td></tr>';
					}
                    $(".head1").append(str)
            	}
            	
            },
            error: function () {
                alert('Error');
            }
        });
    }
    
    //查找学员信息
    $(".findBtn1").click(function(){
    	$(".head1 tr:not(':first')").remove()
    	//获取考试日期
    	var fbizdate=$(".ksrq").val()
    	//alert(fbizdate)
    	//获取车型
    	var cfcartype=$(".cfcartype").val()
    	//获取名称
    	var name = $(".name1").val();   	
    	 //根据考试日期和车型去后台取数据      
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsBySubscribedOne',
            type: "post",
            data: {'fbizdate': fbizdate,'cfcartype':cfcartype,'name':name},
            dataType: "json",
            success: function (json) { 
            	//alert(json)           	
            	if(json.length == 0){
            		//alert("目前还没有相关数据,请重新选择考试日期和车型！")           		
            		var nostr='<tr><td style="width: 30px;"></td><td colspan="5">目前还没有相关数据,请重新选择考试日期和车型！</td></tr>'
            			$(".head1").append(nostr)
            	}else{
            	    var str ='';
            		for (var i = 0; i < json.length; i++) {
            			if(json[i].cfsex == 1){
            				json[i].cfsex='男';
            			}else{
            				json[i].cfsex='女';
            			}
                        if(json[i].cfzkzmbh == null){
                            json[i].cfzkzmbh = '';
                        }
						str+='<tr class="xysj"><td class="td" style="width: 20px;"><input  style="width: 20px;" type="checkbox" name="student" value="'+json[i].cfstudentid+'"></td>';
            			str+='<td>'+json[i].cfstudentname+'</td><td>'+json[i].studentName+'</td><td>'+json[i].cfzkzmbh+'</td><td>'+json[i].cfidcardno+'</td>'
            			str+='<td>'+json[i].cfmobile+'</td><td>初次申领</td><td>'+json[i].cfrxsj+'</td>'
            			str+='<td>'+json[i].cfsex+'</td><td>'+json[i].cfqfje+'</td><td>'+fbizdate+'</td>'
            			str+='<td>审核</td><td>'+cfcartype+'</td></tr>';
					}
                    $(".head1").append(str)
            	}
            	
            },
            error: function () {
                alert('Error');
            }
        });
    })
    
     //摸态框设置单击选中
    $(document).on('click','.xysj td:not(.td)',function(){
    	if($(this).parent().find("input:checkbox[name=student]").is(':checked')){
    		$(this).parent().find("input:checkbox[name=student]").removeAttr("checked");
    	}else{
    		$(this).parent().find("input:checkbox[name=student]").attr("checked",":checked")
    	}
    }) 
    //摸态框设置双击确定
 $(document).on('dblclick','.xysj td',function(){
	var id=$(this).parent().find("input:checkbox[name=student]").val(); 
   	if(id == null  ){
	   return false;
  	}
 	   $.ajax({
           url: '<%=path%>/DrivingSys/selStudentsByFid',
           type: "post",
           async: true,
           data: {'id': id},
           dataType: "json",
           success: function (json) {
               var flag=addStudentMesg(json)
               if(flag){
                   $('#modal-overlay').css('visibility', 'hidden')
                   $('.modal-data1').css('visibility', 'hidden')
                   $('.head1 input:checkbox[name=student]').removeAttr('checked');
               }
           },
           error: function () {
               alert('Error');
           }
 	}) 
 })
     /* function checkBox(obj) {	
    	// 只有当选中的时候才会去掉其他已经勾选的checkbox，所以这里只判断选中的情况
    	    if (obj.is(":checked")) {   	
    	         // 先把所有的checkbox 都设置为不选种
    	        $('input:checkbox[name=student]').prop('checked', false);
    	        // 把自己设置为选中
    	        obj.prop('checked',true);
    	    }
    	}  */
     function clickvip(obj){
    	 if(obj.prop("checked")){
    		 obj.next().val(0)
    	 }else{
    		 obj.next().val(1)
    	 }
     }
    //把选中的信息名称填充到输入框中
    $('.subtn1').click(function () {
        var spCodesTemp = "";      
        $('input:checkbox[name=student]:checked').each(function (i) {
            if (0 == i) {
                //把学生id增加到字表中
                spCodesTemp = $(this).val();

            } else {
                spCodesTemp += ("," + $(this).val());

            }
        });
        //alert(spCodesTemp)
		if(spCodesTemp == ""){
		    alert("至少选择一项!")
			return false;
		}
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsByFid',
            type: "post",
            data: {'id': spCodesTemp},
            dataType: "json",
            success: function (json) {
                var flag=addStudentMesg(json)
                if(flag){
                    $('#modal-overlay').css('visibility', 'hidden')
                    $('.modal-data1').css('visibility', 'hidden')
                    $('.head1 input:checkbox[name=student]').removeAttr('checked');
                }
                      	               
            },
            error: function () {
                alert('Error');
            }
        });

    });
    //设置全选功选 
	$('.check1').live('click',function(){
		if($(this).attr("checked")){
			 $("input:checkbox[name=checkchilden]").prop("checked",true) 
		}else{
			$('input:checkbox[name=checkchilden]').removeAttr('checked')
		}
	})
  //单击选中
  $("#table1 tr td:not(.td)").live('click',function(){
    if($(this).parent().find("input:checkbox").is(':checked')){
    	$(this).parent().find("input:checkbox[name=checkchilden]").removeAttr("checked");
    }else{
    	$(this).parent().find("input:checkbox[name=checkchilden]").attr("checked",":checked")
    }
 	}) 
   
   
  //改变审核状态
    function audit(num) {
        var fid = $("input:hidden[name=fid]").val();
        var fnumber =$("input:text[name=fnumber]").val();
        if(num == 3){//反审核
            $('#modal-overlay').css('visibility', 'visible');
            $('.modal-data10').css('visibility', 'visible');
            $("#againstAuditsubmit").click(function(){
                var againstAuditcomment = $("#againstAuditcomment").val();
                if (againstAuditcomment == null || againstAuditcomment == '') {
                    againstAuditcomment = "不同意";
                }
                $.ajax({
                    url:'<%=path%>/DrivingSys/againstCheckSubjectOneResultActiviti',
                    type:'post',
                    data:{'fid':fid,'fnumber':fnumber,'againstAuditcomment':againstAuditcomment},
                    dataType: 'json',
                    success:function(result){
                        if(result["result"] == 'success'){
                            //showAlert("反审核成功!","querySubjectOneResult/look.action")
                            showAlert("反审核成功!","intoUpdateSubjectOneResult?fid=" + fid)
                            /*alert("反审核成功!")
                            setTimeout(function () {
                                location="<%=path%>/DrivingSys/querySubjectOneResult/look.action";
                            }, 1000);*/
                        }else{
                            alert("反审核失败!")
                        }
                    },
                    error:function () {alert('Error')}
                })
            })
		}
	    if(num == 4){//提交
            $.messager.confirm('提示', '是否提交?', function (r) {
                if(r){
                    $.ajax({
                        url:'<%=path%>/DrivingSys/submitSubjectOneResultActiviti',
                        type:'post',
                        data:{'fid':fid,'fnumber':fnumber},
                        dataType: 'json',
                        success:function(result){
                            if(result["result"] == 'success'){
                                //showAlert("提交成功!","querySubjectOneResult/look.action")
                                showAlert("提交成功!","intoUpdateSubjectOneResult?fid=" + fid)
                                /* alert("提交成功!")
                                 setTimeout(function () {
                                     location="<%=path%>/DrivingSys/querySubjectOneResult/look.action";
                                }, 1000);*/
                            }else{
                                alert("提交失败!")
                            }
                        },
                        error:function () {alert('Error')}
                    })
				}
			})
		}
		if(num == 5){//审核
            $('#modal-overlay').css('visibility', 'visible');
            $('.modal-data9').css('visibility', 'visible');
            $("#auditsubmit").click(function() {
                var agree = $("input:radio[name=check]:checked").val();//同意不同意
                var auditcomment = $("#auditcomment").val();
                if (agree == null) {
                    alert("你选择你的意见");
                    return false;
                }
                if (auditcomment == null || auditcomment == '') {
                    if(agree == "1"){
                        auditcomment = "同意";
					}else{
                        auditcomment = "不同意";
					}
                }
                $.ajax({
                    url:'<%=path%>/DrivingSys/checkSubjectOneResultActiviti',
                    type:'post',
                    data:{'fid':fid,'fnumber':fnumber,'agree':agree,'auditcomment':auditcomment},
                    dataType: 'json',
                    // async: true,
                    success:function(result){
                        if(result["result"] == 'success'){
                            //showAlert("审核成功!","querySubjectOneResult/look.action")
                            showAlert("审核成功!","intoUpdateSubjectOneResult?fid=" + fid)
                            /* alert("审核成功!")
                             setTimeout(function () {
                                 location="<%=path%>/DrivingSys/querySubjectOneResult/look.action";
                            }, 1000);*/
                        }else{
                            alert("审核失败!")
                        }
                    },
                    error:function () {alert('Error')}
                })
			})
		}
    }
    function subForm(){
        var count =0;
        $("input:checkbox[name=checkchilden]").each(function(i){
            count ++;
        })
        if(count == 0){
            alert("请先添加学员!")
            return false;
        }
        $("input[type='submit']").attr("disabled", "disabled");
    }
    //改变业务日期或者车型清空已经增加的学员
    var oldTime =$("#ywrq").val();//记录改变之前的时间
    function changeFbizdate(obj) {
        if(oldTime  == '' ){
            oldTime = $("#ywrq").val()
        }
        var k = 0;
        $("input:checkbox[name=checkchilden]").each(function(i){
            k++;
        })
        if(k != 0){
            $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
                if (r) {
                    $("input:checkbox[name=checkchilden]").each(function (i) {
                        $(this).parent().parent().remove()
                    })
                    oldTime = $("#ywrq").val()
                } else {
                    $("#ywrq").val(oldTime)
                }
            })
        }else{//把oldTime赋值
            oldTime = $("#ywrq").val()
        }
    }
    var oldCartype = $(".cfcartype").val();//记录之前的车型
    function changeCartype() {
        var k = 0;
        $("input:checkbox[name=checkchilden]").each(function(i){
            k++;
        })
        if(k != 0){
            $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
                if (r) {
                    $("input:checkbox[name=checkchilden]").each(function (i) {
                        $(this).parent().parent().remove()
                    })
                    oldCartype = $(".cfcartype").val()
                } else {
                    $(".cfcartype").val(oldCartype)
                }
            })
        }else{//把oldTime赋值
            oldCartype = $(".cfcartype").val()
        }
    }
</script>
</html>